
<?php /*
Hide and show tasks - Javascrip task.*/
?>
<html>
<head>
<script type="text/javascript">
function check(){
var testvalue = document.getElementById("content").value;
var limit = testvalue.substr(0,100);
var replacetext= testvalue.replace(/C/g,"D");
alert(replacetext);
document.getElementById("test").innerHTML = limit;
document.getElementById("test1").innerHTML = replacetext;
}


</script>
</head>
<body>
<form action="ex5.php" method="post">

<textarea name="content1" value=" " id="content" ></textarea>
<input type="button" value="find" name=" " onclick="check();">
</form>
<div id="test"></div>
<div id="test1"></div>
</body>
<html>



